
cd /root/aptos-node/testnet/
docker-compose down


read -p "输入节点名称[别用中文][示例：yanhui001]:" nodename
read -p "输入验证节点ip端口[建议${ip}:6180]:" yuning


docker run --rm -v /root/aptos-node/testnet:/data/aptos-cli jiangydev/aptos-cli:v0.1.1 aptos genesis set-validator-configuration --keys-dir /data/aptos-cli --local-repository-dir /data/aptos-cli --username $nodename --validator-host $yuning:6180 --full-node-host $yuning:6182
bash -c "cat > layout.yaml" <<EOF
---
root_key: "0x5243ca72b0766d9e9cbf2debf6153443b01a1e0e6d086c7ea206eaf6f8043956"
users:
  - $nodename
chain_id: 23
EOF
docker run --rm -v /root/aptos-node/testnet:/data/aptos-cli jiangydev/aptos-cli:v0.1.1 sh -c "rm -rf /data/aptos-cli/genesis.blob && rm -rf /data/aptos-cli/waypoint.txt && rm -rf /data/aptos-cli/framework && cp -r /framework /data/aptos-cli && aptos genesis generate-genesis --local-repository-dir /data/aptos-cli --output-dir /data/aptos-cli && rm -rf /data/aptos-cli/framework" ;
docker-compose up -d
cat $nodename.yaml

